/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package negocio;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Dvid
 */
@Embeddable
public class DeptosucurPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "deptoid")
    private int deptoid;
    @Basic(optional = false)
    @Column(name = "sucurid")
    private int sucurid;

    public DeptosucurPK() {
    }

    public DeptosucurPK(int deptoid, int sucurid) {
        this.deptoid = deptoid;
        this.sucurid = sucurid;
    }

    public int getDeptoid() {
        return deptoid;
    }

    public void setDeptoid(int deptoid) {
        this.deptoid = deptoid;
    }

    public int getSucurid() {
        return sucurid;
    }

    public void setSucurid(int sucurid) {
        this.sucurid = sucurid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) deptoid;
        hash += (int) sucurid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DeptosucurPK)) {
            return false;
        }
        DeptosucurPK other = (DeptosucurPK) object;
        if (this.deptoid != other.deptoid) {
            return false;
        }
        if (this.sucurid != other.sucurid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "negocio.DeptosucurPK[ deptoid=" + deptoid + ", sucurid=" + sucurid + " ]";
    }
    
}
